﻿# -*- coding: utf-8 -*-

# 1、添加数据
from django.http import HttpResponse
 
from TestModel.models import Test
 
# 数据库操作
def testdb(request):
    test1 = Test(name='xx1')
    test1.save()
    test2 = Test(name='xx2')
    test2.save()
    return HttpResponse("<p>数据添加成功！</p>")
